//书写商品相关的所有api接口
import request from '@/utils/requiest'
import { parse } from '@vue/compiler-dom'

interface MyHotListParams {
    count?: number
    limitNum?: number
}
// 1、秒杀商品接口
export const hostListApi = (info: MyHotListParams) => request.get('/pro/seckilllist', {
    params: info
})

// 2、热门搜索接口
export const hotSearchApi = () => request.get('/pro/hotword')

//3、模糊搜索相关?
export const searchListApi = (keyword: string, count?: Number, limitNum?: Number) => request.get('/pro/search', { params: { keyword } })

//4、获取商品列表（分页）
export const goodListApi = (info: { count: Number, limit?: Number }) => request.get('/pro/list', { params: { info } })

//5、获取产品分类列表
export const categoryListApi = () => request.get('/pro/categorylist')

//6、获取产品分类下的品牌列表
export const categoryBrandListApi = (cate: string) => request.get('/pro/categorybrandlist', { params: { category: cate } })

//7、 获取某分类下某品牌的产品列表
export const categorybrandprolistApi = (info: { category: string, brand: string }) => request.get('/pro/categorybrandprolist', { params: info })